home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / utils / console / svgatext.3 / svgatext / SVGATextMode-1.3 / XFREE / patches / Cirrus_ClockChip.patch next >
Encoding:
Text File  |  1995-10-29  |  1.6 KB  |  49 lines

  1. diff -p /home/kmg/xtemp/xc/programs/Xserver/hw/xfree86/common_hw/CirrusClk.c common_hw/CirrusClk.c
  2. *** /home/kmg/xtemp/xc/programs/Xserver/hw/xfree86/common_hw/CirrusClk.c    Sat Jan 28 16:58:08 1995
  3. --- common_hw/CirrusClk.c    Sun Oct 29 17:35:12 1995
  4. ***************
  5. *** 14,22 ****
  6.   /* CLOCK_FACTOR is double the osc freq in kHz (osc = 14.31818 MHz) */
  7.   #define CLOCK_FACTOR 28636
  8.   
  9.   /* clock in kHz is (numer * CLOCK_FACTOR / (denom & 0x3E)) >> (denom & 1) */
  10.   #define CLOCKVAL(n, d) \
  11. !      ((((n) & 0x7F) * CLOCK_FACTOR / ((d) & 0x3E)) >> ((d) & 1))
  12.   
  13.   #define NU_FIXED_CLOCKS 19
  14.   
  15. --- 14,29 ----
  16.   /* CLOCK_FACTOR is double the osc freq in kHz (osc = 14.31818 MHz) */
  17.   #define CLOCK_FACTOR 28636
  18.   
  19. + /* stability constraints for internal VCO -- MAX_VCO also determines the maximum Video pixel clock */
  20. + #define MIN_VCO CLOCK_FACTOR
  21. + #define MAX_VCO 111000
  22.   /* clock in kHz is (numer * CLOCK_FACTOR / (denom & 0x3E)) >> (denom & 1) */
  23. + #define VCOVAL(n, d) \
  24. +      ((((n) & 0x7F) * CLOCK_FACTOR / ((d) & 0x3E)) )
  25.   #define CLOCKVAL(n, d) \
  26. !      (VCOVAL(n, d) >> ((d) & 1))
  27.   
  28.   #define NU_FIXED_CLOCKS 19
  29.   
  30. *************** int CirrusFindClock(freq, num_out, den_o
  31. *** 86,92 ****
  32.           for (d = 0x14; d < 0x3f; d++) {
  33.               int c, diff;
  34.               /* Avoid combinations that can be unstable. */
  35. !             if (n < d && (d & 1) == 0)
  36.                   continue;
  37.               c = CLOCKVAL(n, d);
  38.               diff = abs(c - freq);
  39. --- 93,99 ----
  40.           for (d = 0x14; d < 0x3f; d++) {
  41.               int c, diff;
  42.               /* Avoid combinations that can be unstable. */
  43. !             if ((VCOVAL(n, d) < MIN_VCO) || (VCOVAL(n, d) > MAX_VCO))
  44.                   continue;
  45.               c = CLOCKVAL(n, d);
  46.               diff = abs(c - freq);
  47.